package defpackage; import android.text.TextUtils; import cn.wps.moffice.main.cloud.roaming.account.MemberServerInfo; import com.iflytek.cloud.SpeechEvent; import com.iflytek.cloud.SpeechUtility; import java.io.IOException; import java.util.HashMap; import org.json.JSONException; import org.json.JSONObject; /* renamed from: fju reason: default package */ public class fju { private static final String TAG = fju.class.getSimpleName(); public static String asP() { return fok.bBq().getWPSSid(); } public static boolean bj(String str, String str2) { if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) { return true; } long currentTimeMillis = System.currentTimeMillis(); return currentTimeMillis <= ln(str) * 1000 || currentTimeMillis >= ln(str2) * 1000; } public static MemberServerInfo bxI() throws IOException, JSONException { String str; HashMap hashMap = new HashMap(); hashMap.put("Sid", fok.bBq().getWPSSid()); try { str = lwd.f("https://vip.wps.cn/android/center/base_rec?rec_data=unuse_coupon,rec_act,rec_config,rec_v10", hashMap); } catch (Exception e) { e.getMessage(); str = null; } if (str == null) { return null; } try { JSONObject jSONObject = new JSONObject(str); if ("ok".equals(jSONObject.optString(SpeechUtility.TAG_RESOURCE_RESULT))) { return MemberServerInfo.fromJsonObject(jSONObject.getJSONObject(SpeechEvent.KEY_EVENT_RECORD_DATA)); } return null; } catch (JSONException e2) { e2.getMessage(); throw e2; } } public static boolean bxJ() throws IOException, JSONException { HashMap hashMap = new HashMap(); hashMap.put("Sid", fok.bBq().getWPSSid()); String str = null; try { str = lwd.f("https://vip.wps.cn/sign/is_sign", hashMap); } catch (Exception e) { e.getMessage(); } if (str != null) { try { JSONObject jSONObject = new JSONObject(str); if ("ok".equals(jSONObject.optString(SpeechUtility.TAG_RESOURCE_RESULT))) { return MemberServerInfo.isSignIn(jSONObject.getJSONObject(SpeechEvent.KEY_EVENT_RECORD_DATA)); } } catch (JSONException e2) { e2.getMessage(); throw e2; } } return false; } public static boolean bxK() { String str; try { HashMap hashMap = new HashMap(); hashMap.put("Cookie", "wps_sid=" + cqy.asP()); str = lwd.f("https://vip.wps.cn/user/isnew?memtypes=12:20:40", hashMap); } catch (Exception e) { e.getMessage(); str = null; } if (str == null) { return true; } try { JSONObject jSONObject = new JSONObject(str); return !"ok".equals(jSONObject.getString(SpeechUtility.TAG_RESOURCE_RESULT)) || jSONObject.getInt(SpeechEvent.KEY_EVENT_RECORD_DATA) == 1; } catch (Exception e2) { e2.getMessage(); return true; } } public static fkh bxL() throws IOException, JSONException { String str; try { str = lwd.f("https://service-api.kingsoft-office-service.com/person_center/list" + fki.bxY(), null); } catch (Exception e) { e.getMessage(); str = null; } if (str == null) { return null; } try { JSONObject jSONObject = new JSONObject(str); if ("ok".equals(jSONObject.optString(SpeechUtility.TAG_RESOURCE_RESULT))) { return fkh.f(jSONObject.getJSONObject(SpeechEvent.KEY_EVENT_RECORD_DATA)); } return null; } catch (JSONException e2) { e2.getMessage(); throw e2; } } private static long ln(String str) { try { return Long.parseLong(str); } catch (Exception e) { return 0; } } }